The present invention relates to a power source voltage change discrimination circuit.
When a main power source voltage for operating a microcomputer, for example, is interrupted due to power failure or the like, operation results of the microcomputer may be lost. In order to prevent this, a power source voltage change discrimination circuit is conventionally known which supplies an auxiliary power source voltage to the microcomputer at such an instant and which changes an output voltage from the auxiliary power source voltage to the main power source voltage when the main power source voltage is restored. FIG. 1 shows a microcomputer system which has a power source voltage change discrimination circuit of this type. This power source voltage change discrimination circuit has a voltage selector 2 which selectively supplies the voltage from a main power source 4 or an auxiliary power source 6 to a power source terminal of a microcomputer 8, and a reset circuit 10 which supplies a reset signal to the microcomputer when the main power source 4 is turned on.
Assume that both the main power source 4 and the auxiliary power source 6 are turned on, and the power source voltage from the main power source 4 is supplied to the microcomputer 8 through the voltage selector 2. In this case, the microcomputer 8 is supplied with the power source voltage which increases from 0 V to a main power source voltage VM, and is thereafter held at this voltage VM, as shown in FIG. 2.
When the power source voltage supplied to the microcomputer 8 changes from 0 V to the voltage VM, the reset circuit 10 generates a reset signal for a predetermined period of time to reset the microcomputer 8 to the initial state. On the other hand, if the main power source voltage is interrupted for some reason during the operative period of the microcomputer 8, an auxiliary power source voltage VA from the auxiliary power source 6 is supplied to the microcomputer 8 through the voltage selector 2. This auxiliary power source voltage VA serves to temporarily interrupt the operation of the microcomputer 8 as well as to prevent loss of data such as the operation results in the microcomputer 8.
If the main power source voltage is restored thereafter, the microcomputer 8 receives the main power source voltage VM to resume its processing operation. In this case, since the power source voltage changes not from 0 V but from VA to VM, the reset circuit 10 does not generate a reset signal. Therefore, the microcomputer 8 is not set to the initial state. However, if the difference between the main power source voltage VM and the auxiliary power source voltage VA is great, that is, if the auxiliary power source voltage VA is close to 0 V, it is difficult for the reset circuit 10 to correctly discriminate if the power source voltage has changed from 0 V to VM or from VA to VM. For this reason, when the power source voltage changes from VA to VM, the reset circuit 10 may erroneously generate a reset signal to set the microcomputer 8 to the initial state.
In order to prevent this kind of erroneous operation of the reset circuit 10, a reset circuit 12 as shown in FIG. 3 is conventionally required which has the function to discriminate if the main power source 4 has been turned on or has been restored. This reset circuit 12 has a series circuit of a resistor 12-1 and a capacitor 12-2 coupled between the output terminal of the voltage selector 2 and ground; a series circuit of a resistor 12-3 and an npn transistor TR1; a pnp transistor TR2, the collector of which is grounded through a resistor 12-4 and is coupled to the base of the transistor TR1, the emitter of which is coupled to the output terminal of the voltage selector 2 through a Zener diode 12-5, and the base of which is coupled to a junction of the resistor 12-1 and the capacitor 12-2; and a diode 12-6 coupled in parallel with the resistor 12-1.
In the circuit shown in FIG. 3, when the main power source 4 is turned on, a high voltage is applied between the emitter and base of the transistor, and the transistor TR2 is rendered conductive. Then, current flows through the Zener diode 12-5, the transistor TR2, and the resistor 12-4 to render the transistor TR1 conductive. Then, a voltage of low level is supplied to the microcomputer as a reset signal, and the capacitor 12-2 is charged at a rate which corresponds to a time constant determined by the resistor 12-1 and the capacitor 12-2. When the charging voltage reaches a predetermined value, the transistor TR2 is rendered nonconductive. Then, the transistor TR1 is also rendered nonconductive and the supply of the reset signal to the microcomputer 8 is interrupted. The reset circuit 12 is so constructed that the time required for the transistor TR2 to be rendered nonconductive after the power source voltage 4 reaches VM is longer than the time required for setting the microcomputer 8 to the initial state.
If the power supply is interrupted temporarily due to power failure or the like after the main power source 4 is turned on, the voltage from the auxiliary power source 6 is supplied to the microcomputer 8. If the main power source voltage is restored thereafter, a voltage which is sufficient to render the transistor TR2 conductive is not applied between the emitter and the base of the transistor TR2 due to the charging voltage of the capacitor 12-2. Therefore, the transistors TR1 and TR2 are kept nonconductive, and the reset signal is not supplied to the microcomputer 8.
With the reset circuit 12 of this type, the discrimination is well made between the case wherein the main power source 4 is turned on and the case wherein the main power source voltage is restored, and the reset operation is well controlled thereby, so that high reliability may be attained. However, the requirement for incorporation of a control circuit of this type makes the entire system costly.